using System;

namespace UniversalAdmin.Domain.Entities;

/// <summary>
/// 实体基类，包含所有实体的公共字段
/// </summary>
public abstract class EntityBase
{
    /// <summary>
    /// 主键标识符
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    /// <summary>
    /// 是否激活
    /// </summary>
    public bool IsActive { get; set; } = true;
    /// <summary>
    /// 是否删除
    /// </summary>
    public bool IsDeleted { get; set; } = false;
    /// <summary>
    /// 实体编码
    /// </summary>
    public string? Code { get; set; }
    /// <summary>
    /// 创建者
    /// </summary>
    public Guid CreatedBy { get; set; } = Guid.Empty;// 默认表示"未知创建者"
    /// <summary>
    /// 更新者
    /// </summary>
    public Guid UpdatedBy { get; set; } = Guid.Empty;// 默认表示"未知更新者"

}
